package com.chenfan.mcn.model.dto;

import com.chenfan.common.extension.validation.groups.Modify;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 红人月度结算单-提交人DTO
 *
 * @author wulg
 * @date 2022-01-13
 **/
@Data
public class StarMonthlySettlementSubmiterDTO implements Serializable {

    private static final long serialVersionUID = 4593296515202621511L;

    /**
     * 结算单ID
     */
    @NotNull(message ="结算单ID不能为空")
    private Long settlementId;

    /**
     * 发票信息集合
     */
    @NotEmpty(message ="发票信息集合不能为空")
    private List<InvoiceInfo> invoiceInfoList;

    /**
     * 发票信息
     */
    @Data
    public static class InvoiceInfo {

        /**
         * 子结算单ID
         */
        @NotNull(message ="子结算单ID不能为空", groups = {Modify.class})
        private Long subSettlementId;

        /**
         * 发票号
         */
        private String invoiceNo;

        /**
         * 发票日期
         */
        private Date invoiceDate;

        /**
         * 发票截图
         */
        private String invoiceScreenshot;


    }
}
